 * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    }

    body {
      background: linear-gradient(145deg, #eaf1f9 0%, #d7e3f0 100%);
      min-height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 1.2rem;
    }

    .notepad-glass {
      max-width: 1100px;
      width: 100%;
      background: rgba(255, 255, 255, 0.85);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border-radius: 2.8rem;
      box-shadow: 0 30px 55px -15px #1a3d58, inset 0 1px 4px white;
      padding: 2rem 2.2rem;
      border: 1px solid rgba(255,255,255,0.7);
    }

    h1 {
      font-size: 2.5rem;
      font-weight: 700;
      background: linear-gradient(135deg, #0e3b59, #26648b);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      display: flex;
      align-items: center;
      gap: 0.6rem;
      flex-wrap: wrap;
    }

    .badge-strip {
      display: flex;
      gap: 0.7rem;
      margin-left: auto;
    }

    .badge {
      background: #174e75;
      color: white;
      padding: 0.3rem 1rem;
      border-radius: 40px;
      font-size: 0.7rem;
      font-weight: 500;
      border: 1px solid #7cb2d9;
    }

    .sub {
      color: #1d5179;
      margin: 0.2rem 0 1.5rem 0;
      font-size: 1rem;
      border-left: 5px solid #3183b5;
      padding-left: 1.3rem;
    }

    /* main notepad area */
    .notepad-container {
      background: #ffffffde;
      border-radius: 2.2rem;
      padding: 1.8rem 2rem;
      box-shadow: 0 8px 24px #1a4f7733;
      border: 1px solid white;
    }

    .toolbar {
      display: flex;
      flex-wrap: wrap;
      gap: 1rem;
      margin-bottom: 1.8rem;
      align-items: center;
      justify-content: space-between;
    }

    .tool-group {
      display: flex;
      gap: 0.6rem;
      flex-wrap: wrap;
    }

    .tool-btn {
      background: #e7f2fd;
      border: 2px solid #b9d6f0;
      border-radius: 3rem;
      padding: 0.6rem 1.4rem;
      font-weight: 600;
      color: #0c3f60;
      cursor: pointer;
      transition: 0.1s;
      display: inline-flex;
      align-items: center;
      gap: 0.3rem;
      font-size: 0.9rem;
    }

    .tool-btn:hover {
      background: #c9e2fa;
      border-color: #4682b4;
      transform: scale(1.02);
    }

    .file-info {
      background: #d5e7f7;
      border-radius: 3rem;
      padding: 0.4rem 1.2rem;
      font-size: 0.8rem;
      color: #0d3f61;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    #fileInput {
      display: none;
    }

    .file-label {
      background: #196394;
      color: white;
      padding: 0.4rem 1.2rem;
      border-radius: 3rem;
      cursor: pointer;
      font-size: 0.8rem;
      font-weight: 500;
    }

    /* main textarea */
    .editor-wrapper {
      background: #fbfeff;
      border-radius: 2rem;
      border: 2px solid #c2dbf2;
      overflow: hidden;
      margin-bottom: 1.5rem;
    }

    #noteContent {
      width: 100%;
      min-height: 400px;
      max-height: 600px;
      padding: 1.8rem;
      border: none;
      outline: none;
      font-family: 'Fira Code', 'Monaco', monospace;
      font-size: 1rem;
      line-height: 1.6;
      resize: vertical;
      background: transparent;
      color: #102b3f;
    }

    #noteContent::placeholder {
      color: #9bb9d6;
      font-style: italic;
    }

    /* bottom bar: stats, download, progress */
    .stats-row {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      align-items: center;
      margin: 1rem 0 0.5rem;
    }

    .stats {
      background: #daeaf9;
      border-radius: 3rem;
      padding: 0.5rem 1.5rem;
      font-size: 0.9rem;
      color: #15415f;
    }

    .download-btn {
      background: #0d3c5e;
      border: none;
      padding: 0.8rem 2rem;
      border-radius: 3rem;
      font-weight: 600;
      color: white;
      display: inline-flex;
      align-items: center;
      gap: 0.6rem;
      box-shadow: 0 8px 16px #123d5b70;
      cursor: pointer;
      transition: 0.1s;
      font-size: 1rem;
    }

    .download-btn:hover {
      background: #1b557c;
      transform: scale(1.02);
    }

    .progress {
      height: 6px;
      background: #c4dbf2;
      border-radius: 10px;
      margin: 1rem 0 0.2rem;
      overflow: hidden;
    }

    #progressFill {
      width: 0%;
      height: 6px;
      background: linear-gradient(90deg, #277bb5, #8ac6ff);
      border-radius: 10px;
      transition: width 0.2s;
    }

    #statusMsg {
      color: #12507b;
      background: #e3f0fd;
      border-radius: 3rem;
      padding: 0.5rem 1.4rem;
      margin-top: 0.8rem;
      font-size: 0.9rem;
    }

    footer {
      margin-top: 1.8rem;
      text-align: center;
      color: #26658f;
      font-size: 0.8rem;
    }

    /* clear, save, load buttons */
    .action-group {
      display: flex;
      gap: 0.5rem;
    }